﻿using Microsoft.Phone.Shell;
namespace Tfs.OnTheRoad.Commands
{
    /// <summary>
    /// Navigates to the Settings page, allowing the user to add a new Access Profile
    /// </summary>
    public class AddProfileCommand : BaseCommand
    {
        public override void Execute(object parameter)
        {
            //We remove the old Setting that might be eventually setted here
            if (PhoneApplicationService.Current.State.ContainsKey("SettingsSavedToShowHelpOrAbout"))
                PhoneApplicationService.Current.State.Remove("SettingsSavedToShowHelpOrAbout");
            NavigateTo("/Pages/SettingsPage.xaml?Add=1");             
        }
    }
}